﻿#ifndef RFMAPI_H
#define RFMAPI_H

#include <QObject>

#if (defined(WIN32))
    #include "rfm2g_windows.h"
#endif

#include "./rfm2g_api.h"

enum DataType {
    None = -1,
};


class RfmApi : public QObject
{
    Q_OBJECT
public:
    static RfmApi* getInstance();

    int open();
    int read(quint32 addr, QString &value, quint32 len);
    int write(quint32 addr, const QString &value, int len);
    void close();

private:
    explicit RfmApi(QObject *parent = nullptr);
    RfmApi(const RfmApi &){}
    ~RfmApi();

    static RfmApi*  m_pInstance;

     RFM2GHANDLE    m_Handle;
};

#endif // RFMAPI_H
